package luj.tool.jnproxyan.framework.lujnet.receive;

import luj.net.api.server.FrameDataReceiver;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * https://www.ietf.org/rfc/rfc1928.txt
 */
//@Component
@FrameDataReceiver.Head
final class Recv31Start implements FrameDataReceiver {

  @Override
  public Result receive(Context ctx) {
    return ctx.then()
        .waitBytes(2)
        .nextReceiver(_receiveVersion);
  }

  @Autowired
  Recv32MethodHeader _receiveVersion;
}
